3.1204 \(\int (a+b \tan (e+f x))^2 (c+d \tan (e+f x))^3 \, dx\)

Optimal. Leaf size=219 \[ -\frac{\left (a^2 \left (3 c^2 d-d^3\right )+2 a b c \left (c^2-3 d^2\right )-b^2 d \left (3 c^2-d^2\right )\right ) \log (\cos (e+f x))}{f}-x \left (a^2 \left (-\left (c^3-3 c d^2\right )\right )+2 a b d \left (3 c^2-d^2\right )+b^2 c \left (c^2-3 d^2\right )\right )+\frac{\left (a^2 d+2 a b c-b^2 d\right ) (c+d \tan (e+f x))^2}{2 f}+\frac{2 a b (c+d \tan (e+f x))^3}{3 f}+\frac{2 d (a d+b c) (a c-b d) \tan (e+f x)}{f}+\frac{b^2 (c+d \tan (e+f x))^4}{4 d f} \]

[Out]

-((b^2*c*(c^2 - 3*d^2) + 2*a*b*d*(3*c^2 - d^2) - a^2*(c^3 - 3*c*d^2))*x) - ((2*a*b*c*(c^2 - 3*d^2) - b^2*d*(3*
c^2 - d^2) + a^2*(3*c^2*d - d^3))*Log[Cos[e + f*x]])/f + (2*d*(b*c + a*d)*(a*c - b*d)*Tan[e + f*x])/f + ((2*a*
b*c + a^2*d - b^2*d)*(c + d*Tan[e + f*x])^2)/(2*f) + (2*a*b*(c + d*Tan[e + f*x])^3)/(3*f) + (b^2*(c + d*Tan[e
+ f*x])^4)/(4*d*f)

________________________________________________________________________________________

Rubi [A]  time = 0.267687, antiderivative size = 219, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.16, Rules used = {3543, 3528, 3525, 3475} \[ -\frac{\left (a^2 \left (3 c^2 d-d^3\right )+2 a b c \left (c^2-3 d^2\right )-b^2 d \left (3 c^2-d^2\right )\right ) \log (\cos (e+f x))}{f}-x \left (a^2 \left (-\left (c^3-3 c d^2\right )\right )+2 a b d \left (3 c^2-d^2\right )+b^2 c \left (c^2-3 d^2\right )\right )+\frac{\left (a^2 d+2 a b c-b^2 d\right ) (c+d \tan (e+f x))^2}{2 f}+\frac{2 a b (c+d \tan (e+f x))^3}{3 f}+\frac{2 d (a d+b c) (a c-b d) \tan (e+f x)}{f}+\frac{b^2 (c+d \tan (e+f x))^4}{4 d f} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Tan[e + f*x])^2*(c + d*Tan[e + f*x])^3,x]

[Out]

-((b^2*c*(c^2 - 3*d^2) + 2*a*b*d*(3*c^2 - d^2) - a^2*(c^3 - 3*c*d^2))*x) - ((2*a*b*c*(c^2 - 3*d^2) - b^2*d*(3*
c^2 - d^2) + a^2*(3*c^2*d - d^3))*Log[Cos[e + f*x]])/f + (2*d*(b*c + a*d)*(a*c - b*d)*Tan[e + f*x])/f + ((2*a*
b*c + a^2*d - b^2*d)*(c + d*Tan[e + f*x])^2)/(2*f) + (2*a*b*(c + d*Tan[e + f*x])^3)/(3*f) + (b^2*(c + d*Tan[e
+ f*x])^4)/(4*d*f)

Rule 3543

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^2, x_Symbol] :> Simp[
(d^2*(a + b*Tan[e + f*x])^(m + 1))/(b*f*(m + 1)), x] + Int[(a + b*Tan[e + f*x])^m*Simp[c^2 - d^2 + 2*c*d*Tan[e
 + f*x], x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] &&  !LeQ[m, -1] &&  !(EqQ[m, 2] && EqQ
[a, 0])

Rule 3528

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(d
*(a + b*Tan[e + f*x])^m)/(f*m), x] + Int[(a + b*Tan[e + f*x])^(m - 1)*Simp[a*c - b*d + (b*c + a*d)*Tan[e + f*x
], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && GtQ[m, 0]

Rule 3525

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(a*c - b
*d)*x, x] + (Dist[b*c + a*d, Int[Tan[e + f*x], x], x] + Simp[(b*d*Tan[e + f*x])/f, x]) /; FreeQ[{a, b, c, d, e
, f}, x] && NeQ[b*c - a*d, 0] && NeQ[b*c + a*d, 0]

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int (a+b \tan (e+f x))^2 (c+d \tan (e+f x))^3 \, dx &=\frac{b^2 (c+d \tan (e+f x))^4}{4 d f}+\int \left (a^2-b^2+2 a b \tan (e+f x)\right ) (c+d \tan (e+f x))^3 \, dx\\ &=\frac{2 a b (c+d \tan (e+f x))^3}{3 f}+\frac{b^2 (c+d \tan (e+f x))^4}{4 d f}+\int (c+d \tan (e+f x))^2 \left (a^2 c-b^2 c-2 a b d+\left (2 a b c+a^2 d-b^2 d\right ) \tan (e+f x)\right ) \, dx\\ &=\frac{\left (2 a b c+a^2 d-b^2 d\right ) (c+d \tan (e+f x))^2}{2 f}+\frac{2 a b (c+d \tan (e+f x))^3}{3 f}+\frac{b^2 (c+d \tan (e+f x))^4}{4 d f}+\int (c+d \tan (e+f x)) ((a c-b c-a d-b d) (a c+b c+a d-b d)+2 (b c+a d) (a c-b d) \tan (e+f x)) \, dx\\ &=-\left (b^2 c \left (c^2-3 d^2\right )+2 a b d \left (3 c^2-d^2\right )-a^2 \left (c^3-3 c d^2\right )\right ) x+\frac{2 d (b c+a d) (a c-b d) \tan (e+f x)}{f}+\frac{\left (2 a b c+a^2 d-b^2 d\right ) (c+d \tan (e+f x))^2}{2 f}+\frac{2 a b (c+d \tan (e+f x))^3}{3 f}+\frac{b^2 (c+d \tan (e+f x))^4}{4 d f}+\left (2 a b c \left (c^2-3 d^2\right )-b^2 d \left (3 c^2-d^2\right )+a^2 \left (3 c^2 d-d^3\right )\right ) \int \tan (e+f x) \, dx\\ &=-\left (b^2 c \left (c^2-3 d^2\right )+2 a b d \left (3 c^2-d^2\right )-a^2 \left (c^3-3 c d^2\right )\right ) x-\frac{\left (2 a b c \left (c^2-3 d^2\right )-b^2 d \left (3 c^2-d^2\right )+a^2 \left (3 c^2 d-d^3\right )\right ) \log (\cos (e+f x))}{f}+\frac{2 d (b c+a d) (a c-b d) \tan (e+f x)}{f}+\frac{\left (2 a b c+a^2 d-b^2 d\right ) (c+d \tan (e+f x))^2}{2 f}+\frac{2 a b (c+d \tan (e+f x))^3}{3 f}+\frac{b^2 (c+d \tan (e+f x))^4}{4 d f}\\ \end{align*}

Mathematica [C]  time = 2.42384, size = 221, normalized size = 1.01 \[ \frac{-6 \left (a^2 (-d)+2 a b c+b^2 d\right ) \left (6 c d^2 \tan (e+f x)+(-d+i c)^3 \log (-\tan (e+f x)+i)-(d+i c)^3 \log (\tan (e+f x)+i)+d^3 \tan ^2(e+f x)\right )-4 a b \left (6 d^2 \left (d^2-6 c^2\right ) \tan (e+f x)-12 c d^3 \tan ^2(e+f x)-3 i (c-i d)^4 \log (\tan (e+f x)+i)+3 i (c+i d)^4 \log (-\tan (e+f x)+i)-2 d^4 \tan ^3(e+f x)\right )+3 b^2 (c+d \tan (e+f x))^4}{12 d f} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Tan[e + f*x])^2*(c + d*Tan[e + f*x])^3,x]

[Out]

(3*b^2*(c + d*Tan[e + f*x])^4 - 6*(2*a*b*c - a^2*d + b^2*d)*((I*c - d)^3*Log[I - Tan[e + f*x]] - (I*c + d)^3*L
og[I + Tan[e + f*x]] + 6*c*d^2*Tan[e + f*x] + d^3*Tan[e + f*x]^2) - 4*a*b*((3*I)*(c + I*d)^4*Log[I - Tan[e + f
*x]] - (3*I)*(c - I*d)^4*Log[I + Tan[e + f*x]] + 6*d^2*(-6*c^2 + d^2)*Tan[e + f*x] - 12*c*d^3*Tan[e + f*x]^2 -
 2*d^4*Tan[e + f*x]^3))/(12*d*f)

________________________________________________________________________________________

Maple [B]  time = 0.006, size = 460, normalized size = 2.1 \begin{align*}{\frac{{b}^{2}{d}^{3} \left ( \tan \left ( fx+e \right ) \right ) ^{4}}{4\,f}}+{\frac{2\, \left ( \tan \left ( fx+e \right ) \right ) ^{3}ab{d}^{3}}{3\,f}}+{\frac{ \left ( \tan \left ( fx+e \right ) \right ) ^{3}{b}^{2}c{d}^{2}}{f}}+{\frac{{a}^{2} \left ( \tan \left ( fx+e \right ) \right ) ^{2}{d}^{3}}{2\,f}}+3\,{\frac{ \left ( \tan \left ( fx+e \right ) \right ) ^{2}abc{d}^{2}}{f}}+{\frac{3\, \left ( \tan \left ( fx+e \right ) \right ) ^{2}{b}^{2}{c}^{2}d}{2\,f}}-{\frac{ \left ( \tan \left ( fx+e \right ) \right ) ^{2}{b}^{2}{d}^{3}}{2\,f}}+3\,{\frac{{a}^{2}\tan \left ( fx+e \right ) c{d}^{2}}{f}}+6\,{\frac{ab{c}^{2}d\tan \left ( fx+e \right ) }{f}}-2\,{\frac{ab{d}^{3}\tan \left ( fx+e \right ) }{f}}+{\frac{{b}^{2}{c}^{3}\tan \left ( fx+e \right ) }{f}}-3\,{\frac{{b}^{2}c{d}^{2}\tan \left ( fx+e \right ) }{f}}+{\frac{3\,{a}^{2}\ln \left ( 1+ \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ){c}^{2}d}{2\,f}}-{\frac{{a}^{2}\ln \left ( 1+ \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ){d}^{3}}{2\,f}}+{\frac{\ln \left ( 1+ \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) ab{c}^{3}}{f}}-3\,{\frac{\ln \left ( 1+ \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) abc{d}^{2}}{f}}-{\frac{3\,\ln \left ( 1+ \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ){b}^{2}{c}^{2}d}{2\,f}}+{\frac{\ln \left ( 1+ \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ){b}^{2}{d}^{3}}{2\,f}}+{\frac{{a}^{2}\arctan \left ( \tan \left ( fx+e \right ) \right ){c}^{3}}{f}}-3\,{\frac{{a}^{2}\arctan \left ( \tan \left ( fx+e \right ) \right ) c{d}^{2}}{f}}-6\,{\frac{\arctan \left ( \tan \left ( fx+e \right ) \right ) ab{c}^{2}d}{f}}+2\,{\frac{\arctan \left ( \tan \left ( fx+e \right ) \right ) ab{d}^{3}}{f}}-{\frac{\arctan \left ( \tan \left ( fx+e \right ) \right ){b}^{2}{c}^{3}}{f}}+3\,{\frac{\arctan \left ( \tan \left ( fx+e \right ) \right ){b}^{2}c{d}^{2}}{f}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*tan(f*x+e))^2*(c+d*tan(f*x+e))^3,x)

[Out]

1/4/f*b^2*d^3*tan(f*x+e)^4+2/3/f*tan(f*x+e)^3*a*b*d^3+1/f*tan(f*x+e)^3*b^2*c*d^2+1/2/f*a^2*tan(f*x+e)^2*d^3+3/
f*tan(f*x+e)^2*a*b*c*d^2+3/2/f*tan(f*x+e)^2*b^2*c^2*d-1/2/f*tan(f*x+e)^2*b^2*d^3+3/f*a^2*tan(f*x+e)*c*d^2+6/f*
a*b*c^2*d*tan(f*x+e)-2/f*a*b*d^3*tan(f*x+e)+1/f*b^2*c^3*tan(f*x+e)-3/f*b^2*c*d^2*tan(f*x+e)+3/2/f*a^2*ln(1+tan
(f*x+e)^2)*c^2*d-1/2/f*a^2*ln(1+tan(f*x+e)^2)*d^3+1/f*ln(1+tan(f*x+e)^2)*a*b*c^3-3/f*ln(1+tan(f*x+e)^2)*a*b*c*
d^2-3/2/f*ln(1+tan(f*x+e)^2)*b^2*c^2*d+1/2/f*ln(1+tan(f*x+e)^2)*b^2*d^3+1/f*a^2*arctan(tan(f*x+e))*c^3-3/f*a^2
*arctan(tan(f*x+e))*c*d^2-6/f*arctan(tan(f*x+e))*a*b*c^2*d+2/f*arctan(tan(f*x+e))*a*b*d^3-1/f*arctan(tan(f*x+e
))*b^2*c^3+3/f*arctan(tan(f*x+e))*b^2*c*d^2

________________________________________________________________________________________

Maxima [A]  time = 1.92431, size = 332, normalized size = 1.52 \begin{align*} \frac{3 \, b^{2} d^{3} \tan \left (f x + e\right )^{4} + 4 \,{\left (3 \, b^{2} c d^{2} + 2 \, a b d^{3}\right )} \tan \left (f x + e\right )^{3} + 6 \,{\left (3 \, b^{2} c^{2} d + 6 \, a b c d^{2} +{\left (a^{2} - b^{2}\right )} d^{3}\right )} \tan \left (f x + e\right )^{2} - 12 \,{\left (6 \, a b c^{2} d - 2 \, a b d^{3} -{\left (a^{2} - b^{2}\right )} c^{3} + 3 \,{\left (a^{2} - b^{2}\right )} c d^{2}\right )}{\left (f x + e\right )} + 6 \,{\left (2 \, a b c^{3} - 6 \, a b c d^{2} + 3 \,{\left (a^{2} - b^{2}\right )} c^{2} d -{\left (a^{2} - b^{2}\right )} d^{3}\right )} \log \left (\tan \left (f x + e\right )^{2} + 1\right ) + 12 \,{\left (b^{2} c^{3} + 6 \, a b c^{2} d - 2 \, a b d^{3} + 3 \,{\left (a^{2} - b^{2}\right )} c d^{2}\right )} \tan \left (f x + e\right )}{12 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(f*x+e))^2*(c+d*tan(f*x+e))^3,x, algorithm="maxima")

[Out]

1/12*(3*b^2*d^3*tan(f*x + e)^4 + 4*(3*b^2*c*d^2 + 2*a*b*d^3)*tan(f*x + e)^3 + 6*(3*b^2*c^2*d + 6*a*b*c*d^2 + (
a^2 - b^2)*d^3)*tan(f*x + e)^2 - 12*(6*a*b*c^2*d - 2*a*b*d^3 - (a^2 - b^2)*c^3 + 3*(a^2 - b^2)*c*d^2)*(f*x + e
) + 6*(2*a*b*c^3 - 6*a*b*c*d^2 + 3*(a^2 - b^2)*c^2*d - (a^2 - b^2)*d^3)*log(tan(f*x + e)^2 + 1) + 12*(b^2*c^3
+ 6*a*b*c^2*d - 2*a*b*d^3 + 3*(a^2 - b^2)*c*d^2)*tan(f*x + e))/f

________________________________________________________________________________________

Fricas [A]  time = 1.36981, size = 532, normalized size = 2.43 \begin{align*} \frac{3 \, b^{2} d^{3} \tan \left (f x + e\right )^{4} + 4 \,{\left (3 \, b^{2} c d^{2} + 2 \, a b d^{3}\right )} \tan \left (f x + e\right )^{3} - 12 \,{\left (6 \, a b c^{2} d - 2 \, a b d^{3} -{\left (a^{2} - b^{2}\right )} c^{3} + 3 \,{\left (a^{2} - b^{2}\right )} c d^{2}\right )} f x + 6 \,{\left (3 \, b^{2} c^{2} d + 6 \, a b c d^{2} +{\left (a^{2} - b^{2}\right )} d^{3}\right )} \tan \left (f x + e\right )^{2} - 6 \,{\left (2 \, a b c^{3} - 6 \, a b c d^{2} + 3 \,{\left (a^{2} - b^{2}\right )} c^{2} d -{\left (a^{2} - b^{2}\right )} d^{3}\right )} \log \left (\frac{1}{\tan \left (f x + e\right )^{2} + 1}\right ) + 12 \,{\left (b^{2} c^{3} + 6 \, a b c^{2} d - 2 \, a b d^{3} + 3 \,{\left (a^{2} - b^{2}\right )} c d^{2}\right )} \tan \left (f x + e\right )}{12 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(f*x+e))^2*(c+d*tan(f*x+e))^3,x, algorithm="fricas")

[Out]

1/12*(3*b^2*d^3*tan(f*x + e)^4 + 4*(3*b^2*c*d^2 + 2*a*b*d^3)*tan(f*x + e)^3 - 12*(6*a*b*c^2*d - 2*a*b*d^3 - (a
^2 - b^2)*c^3 + 3*(a^2 - b^2)*c*d^2)*f*x + 6*(3*b^2*c^2*d + 6*a*b*c*d^2 + (a^2 - b^2)*d^3)*tan(f*x + e)^2 - 6*
(2*a*b*c^3 - 6*a*b*c*d^2 + 3*(a^2 - b^2)*c^2*d - (a^2 - b^2)*d^3)*log(1/(tan(f*x + e)^2 + 1)) + 12*(b^2*c^3 +
6*a*b*c^2*d - 2*a*b*d^3 + 3*(a^2 - b^2)*c*d^2)*tan(f*x + e))/f

________________________________________________________________________________________

Sympy [A]  time = 1.05599, size = 445, normalized size = 2.03 \begin{align*} \begin{cases} a^{2} c^{3} x + \frac{3 a^{2} c^{2} d \log{\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} - 3 a^{2} c d^{2} x + \frac{3 a^{2} c d^{2} \tan{\left (e + f x \right )}}{f} - \frac{a^{2} d^{3} \log{\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} + \frac{a^{2} d^{3} \tan ^{2}{\left (e + f x \right )}}{2 f} + \frac{a b c^{3} \log{\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{f} - 6 a b c^{2} d x + \frac{6 a b c^{2} d \tan{\left (e + f x \right )}}{f} - \frac{3 a b c d^{2} \log{\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{f} + \frac{3 a b c d^{2} \tan ^{2}{\left (e + f x \right )}}{f} + 2 a b d^{3} x + \frac{2 a b d^{3} \tan ^{3}{\left (e + f x \right )}}{3 f} - \frac{2 a b d^{3} \tan{\left (e + f x \right )}}{f} - b^{2} c^{3} x + \frac{b^{2} c^{3} \tan{\left (e + f x \right )}}{f} - \frac{3 b^{2} c^{2} d \log{\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} + \frac{3 b^{2} c^{2} d \tan ^{2}{\left (e + f x \right )}}{2 f} + 3 b^{2} c d^{2} x + \frac{b^{2} c d^{2} \tan ^{3}{\left (e + f x \right )}}{f} - \frac{3 b^{2} c d^{2} \tan{\left (e + f x \right )}}{f} + \frac{b^{2} d^{3} \log{\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} + \frac{b^{2} d^{3} \tan ^{4}{\left (e + f x \right )}}{4 f} - \frac{b^{2} d^{3} \tan ^{2}{\left (e + f x \right )}}{2 f} & \text{for}\: f \neq 0 \\x \left (a + b \tan{\left (e \right )}\right )^{2} \left (c + d \tan{\left (e \right )}\right )^{3} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(f*x+e))**2*(c+d*tan(f*x+e))**3,x)

[Out]

Piecewise((a**2*c**3*x + 3*a**2*c**2*d*log(tan(e + f*x)**2 + 1)/(2*f) - 3*a**2*c*d**2*x + 3*a**2*c*d**2*tan(e
+ f*x)/f - a**2*d**3*log(tan(e + f*x)**2 + 1)/(2*f) + a**2*d**3*tan(e + f*x)**2/(2*f) + a*b*c**3*log(tan(e + f
*x)**2 + 1)/f - 6*a*b*c**2*d*x + 6*a*b*c**2*d*tan(e + f*x)/f - 3*a*b*c*d**2*log(tan(e + f*x)**2 + 1)/f + 3*a*b
*c*d**2*tan(e + f*x)**2/f + 2*a*b*d**3*x + 2*a*b*d**3*tan(e + f*x)**3/(3*f) - 2*a*b*d**3*tan(e + f*x)/f - b**2
*c**3*x + b**2*c**3*tan(e + f*x)/f - 3*b**2*c**2*d*log(tan(e + f*x)**2 + 1)/(2*f) + 3*b**2*c**2*d*tan(e + f*x)
**2/(2*f) + 3*b**2*c*d**2*x + b**2*c*d**2*tan(e + f*x)**3/f - 3*b**2*c*d**2*tan(e + f*x)/f + b**2*d**3*log(tan
(e + f*x)**2 + 1)/(2*f) + b**2*d**3*tan(e + f*x)**4/(4*f) - b**2*d**3*tan(e + f*x)**2/(2*f), Ne(f, 0)), (x*(a
+ b*tan(e))**2*(c + d*tan(e))**3, True))

________________________________________________________________________________________

Giac [B]  time = 7.00153, size = 6152, normalized size = 28.09 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(f*x+e))^2*(c+d*tan(f*x+e))^3,x, algorithm="giac")

[Out]

1/12*(12*a^2*c^3*f*x*tan(f*x)^4*tan(e)^4 - 12*b^2*c^3*f*x*tan(f*x)^4*tan(e)^4 - 72*a*b*c^2*d*f*x*tan(f*x)^4*ta
n(e)^4 - 36*a^2*c*d^2*f*x*tan(f*x)^4*tan(e)^4 + 36*b^2*c*d^2*f*x*tan(f*x)^4*tan(e)^4 + 24*a*b*d^3*f*x*tan(f*x)
^4*tan(e)^4 - 12*a*b*c^3*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2
 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^4*tan(e)^4 - 18*a^2*c^2*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*ta
n(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^4*tan(e)^4
+ 18*b^2*c^2*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x
)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^4*tan(e)^4 + 36*a*b*c*d^2*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2
*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^4*tan(e)^4 + 6*a^2*d^
3*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f
*x)*tan(e) + 1))*tan(f*x)^4*tan(e)^4 - 6*b^2*d^3*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(
e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^4*tan(e)^4 - 48*a^2*c^3*f*x*tan(f*x)^
3*tan(e)^3 + 48*b^2*c^3*f*x*tan(f*x)^3*tan(e)^3 + 288*a*b*c^2*d*f*x*tan(f*x)^3*tan(e)^3 + 144*a^2*c*d^2*f*x*ta
n(f*x)^3*tan(e)^3 - 144*b^2*c*d^2*f*x*tan(f*x)^3*tan(e)^3 - 96*a*b*d^3*f*x*tan(f*x)^3*tan(e)^3 + 18*b^2*c^2*d*
tan(f*x)^4*tan(e)^4 + 36*a*b*c*d^2*tan(f*x)^4*tan(e)^4 + 6*a^2*d^3*tan(f*x)^4*tan(e)^4 - 9*b^2*d^3*tan(f*x)^4*
tan(e)^4 + 48*a*b*c^3*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 +
tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^3*tan(e)^3 + 72*a^2*c^2*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e
)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^3*tan(e)^3 - 7
2*b^2*c^2*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2
 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^3*tan(e)^3 - 144*a*b*c*d^2*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*t
an(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^3*tan(e)^3 - 24*a^2*d^3
*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*
x)*tan(e) + 1))*tan(f*x)^3*tan(e)^3 + 24*b^2*d^3*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(
e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^3*tan(e)^3 - 12*b^2*c^3*tan(f*x)^4*ta
n(e)^3 - 72*a*b*c^2*d*tan(f*x)^4*tan(e)^3 - 36*a^2*c*d^2*tan(f*x)^4*tan(e)^3 + 36*b^2*c*d^2*tan(f*x)^4*tan(e)^
3 + 24*a*b*d^3*tan(f*x)^4*tan(e)^3 - 12*b^2*c^3*tan(f*x)^3*tan(e)^4 - 72*a*b*c^2*d*tan(f*x)^3*tan(e)^4 - 36*a^
2*c*d^2*tan(f*x)^3*tan(e)^4 + 36*b^2*c*d^2*tan(f*x)^3*tan(e)^4 + 24*a*b*d^3*tan(f*x)^3*tan(e)^4 + 72*a^2*c^3*f
*x*tan(f*x)^2*tan(e)^2 - 72*b^2*c^3*f*x*tan(f*x)^2*tan(e)^2 - 432*a*b*c^2*d*f*x*tan(f*x)^2*tan(e)^2 - 216*a^2*
c*d^2*f*x*tan(f*x)^2*tan(e)^2 + 216*b^2*c*d^2*f*x*tan(f*x)^2*tan(e)^2 + 144*a*b*d^3*f*x*tan(f*x)^2*tan(e)^2 +
18*b^2*c^2*d*tan(f*x)^4*tan(e)^2 + 36*a*b*c*d^2*tan(f*x)^4*tan(e)^2 + 6*a^2*d^3*tan(f*x)^4*tan(e)^2 - 6*b^2*d^
3*tan(f*x)^4*tan(e)^2 - 36*b^2*c^2*d*tan(f*x)^3*tan(e)^3 - 72*a*b*c*d^2*tan(f*x)^3*tan(e)^3 - 12*a^2*d^3*tan(f
*x)^3*tan(e)^3 + 24*b^2*d^3*tan(f*x)^3*tan(e)^3 + 18*b^2*c^2*d*tan(f*x)^2*tan(e)^4 + 36*a*b*c*d^2*tan(f*x)^2*t
an(e)^4 + 6*a^2*d^3*tan(f*x)^2*tan(e)^4 - 6*b^2*d^3*tan(f*x)^2*tan(e)^4 - 12*b^2*c*d^2*tan(f*x)^4*tan(e) - 8*a
*b*d^3*tan(f*x)^4*tan(e) - 72*a*b*c^3*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*
x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^2*tan(e)^2 - 108*a^2*c^2*d*log(4*(tan(e)^2 + 1)/
(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*
x)^2*tan(e)^2 + 108*b^2*c^2*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan
(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^2*tan(e)^2 + 216*a*b*c*d^2*log(4*(tan(e)^2 + 1)/(tan(f*x
)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^2*tan
(e)^2 + 36*a^2*d^3*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan
(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^2*tan(e)^2 - 36*b^2*d^3*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 -
 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^2*tan(e)^2 + 36*b^2
*c^3*tan(f*x)^3*tan(e)^2 + 216*a*b*c^2*d*tan(f*x)^3*tan(e)^2 + 108*a^2*c*d^2*tan(f*x)^3*tan(e)^2 - 144*b^2*c*d
^2*tan(f*x)^3*tan(e)^2 - 96*a*b*d^3*tan(f*x)^3*tan(e)^2 + 36*b^2*c^3*tan(f*x)^2*tan(e)^3 + 216*a*b*c^2*d*tan(f
*x)^2*tan(e)^3 + 108*a^2*c*d^2*tan(f*x)^2*tan(e)^3 - 144*b^2*c*d^2*tan(f*x)^2*tan(e)^3 - 96*a*b*d^3*tan(f*x)^2
*tan(e)^3 - 12*b^2*c*d^2*tan(f*x)*tan(e)^4 - 8*a*b*d^3*tan(f*x)*tan(e)^4 + 3*b^2*d^3*tan(f*x)^4 - 48*a^2*c^3*f
*x*tan(f*x)*tan(e) + 48*b^2*c^3*f*x*tan(f*x)*tan(e) + 288*a*b*c^2*d*f*x*tan(f*x)*tan(e) + 144*a^2*c*d^2*f*x*ta
n(f*x)*tan(e) - 144*b^2*c*d^2*f*x*tan(f*x)*tan(e) - 96*a*b*d^3*f*x*tan(f*x)*tan(e) - 36*b^2*c^2*d*tan(f*x)^3*t
an(e) - 72*a*b*c*d^2*tan(f*x)^3*tan(e) - 12*a^2*d^3*tan(f*x)^3*tan(e) + 24*b^2*d^3*tan(f*x)^3*tan(e) + 36*b^2*
c^2*d*tan(f*x)^2*tan(e)^2 + 72*a*b*c*d^2*tan(f*x)^2*tan(e)^2 + 12*a^2*d^3*tan(f*x)^2*tan(e)^2 - 12*b^2*d^3*tan
(f*x)^2*tan(e)^2 - 36*b^2*c^2*d*tan(f*x)*tan(e)^3 - 72*a*b*c*d^2*tan(f*x)*tan(e)^3 - 12*a^2*d^3*tan(f*x)*tan(e
)^3 + 24*b^2*d^3*tan(f*x)*tan(e)^3 + 3*b^2*d^3*tan(e)^4 + 12*b^2*c*d^2*tan(f*x)^3 + 8*a*b*d^3*tan(f*x)^3 + 48*
a*b*c^3*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2
*tan(f*x)*tan(e) + 1))*tan(f*x)*tan(e) + 72*a^2*c^2*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3
*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)*tan(e) - 72*b^2*c^2*d*log(4*(tan
(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) +
 1))*tan(f*x)*tan(e) - 144*a*b*c*d^2*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x
)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)*tan(e) - 24*a^2*d^3*log(4*(tan(e)^2 + 1)/(tan(f*x
)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)*tan(e
) + 24*b^2*d^3*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x
)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)*tan(e) - 36*b^2*c^3*tan(f*x)^2*tan(e) - 216*a*b*c^2*d*tan(f*x)^2*tan(e)
 - 108*a^2*c*d^2*tan(f*x)^2*tan(e) + 144*b^2*c*d^2*tan(f*x)^2*tan(e) + 96*a*b*d^3*tan(f*x)^2*tan(e) - 36*b^2*c
^3*tan(f*x)*tan(e)^2 - 216*a*b*c^2*d*tan(f*x)*tan(e)^2 - 108*a^2*c*d^2*tan(f*x)*tan(e)^2 + 144*b^2*c*d^2*tan(f
*x)*tan(e)^2 + 96*a*b*d^3*tan(f*x)*tan(e)^2 + 12*b^2*c*d^2*tan(e)^3 + 8*a*b*d^3*tan(e)^3 + 12*a^2*c^3*f*x - 12
*b^2*c^3*f*x - 72*a*b*c^2*d*f*x - 36*a^2*c*d^2*f*x + 36*b^2*c*d^2*f*x + 24*a*b*d^3*f*x + 18*b^2*c^2*d*tan(f*x)
^2 + 36*a*b*c*d^2*tan(f*x)^2 + 6*a^2*d^3*tan(f*x)^2 - 6*b^2*d^3*tan(f*x)^2 - 36*b^2*c^2*d*tan(f*x)*tan(e) - 72
*a*b*c*d^2*tan(f*x)*tan(e) - 12*a^2*d^3*tan(f*x)*tan(e) + 24*b^2*d^3*tan(f*x)*tan(e) + 18*b^2*c^2*d*tan(e)^2 +
 36*a*b*c*d^2*tan(e)^2 + 6*a^2*d^3*tan(e)^2 - 6*b^2*d^3*tan(e)^2 - 12*a*b*c^3*log(4*(tan(e)^2 + 1)/(tan(f*x)^4
*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)) - 18*a^2*c^2*d*lo
g(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*
tan(e) + 1)) + 18*b^2*c^2*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e
)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)) + 36*a*b*c*d^2*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*
x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)) + 6*a^2*d^3*log(4*(tan(e)^2 + 1)/(tan
(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)) - 6*b^2*d^
3*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f
*x)*tan(e) + 1)) + 12*b^2*c^3*tan(f*x) + 72*a*b*c^2*d*tan(f*x) + 36*a^2*c*d^2*tan(f*x) - 36*b^2*c*d^2*tan(f*x)
 - 24*a*b*d^3*tan(f*x) + 12*b^2*c^3*tan(e) + 72*a*b*c^2*d*tan(e) + 36*a^2*c*d^2*tan(e) - 36*b^2*c*d^2*tan(e) -
 24*a*b*d^3*tan(e) + 18*b^2*c^2*d + 36*a*b*c*d^2 + 6*a^2*d^3 - 9*b^2*d^3)/(f*tan(f*x)^4*tan(e)^4 - 4*f*tan(f*x
)^3*tan(e)^3 + 6*f*tan(f*x)^2*tan(e)^2 - 4*f*tan(f*x)*tan(e) + f)